<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>GThemedIcon</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="GIO Reference Manual">
<link rel="up" href="icons.html" title="Icons">
<link rel="prev" href="GLoadableIcon.html" title="GLoadableIcon">
<link rel="next" href="utils.html" title="Utilities">
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="pt01.html" title="Part&#160;I.&#160;GIO Overview">
<link rel="chapter" href="ch01.html" title="Introduction">
<link rel="chapter" href="ch02.html" title="Compiling GIO applications">
<link rel="chapter" href="ch03.html" title="Running GIO applications">
<link rel="chapter" href="gio-extension-points.html" title="Extending GIO">
<link rel="part" href="pt02.html" title="Part&#160;II.&#160;API Reference">
<link rel="chapter" href="file_ops.html" title="File Operations">
<link rel="chapter" href="file_mon.html" title="File System Monitoring">
<link rel="chapter" href="async.html" title="Asynchronous I/O">
<link rel="chapter" href="streaming.html" title="Streaming I/O">
<link rel="chapter" href="types.html" title="File types and applications">
<link rel="chapter" href="volume_mon.html" title="Volumes and Drives">
<link rel="chapter" href="icons.html" title="Icons">
<link rel="chapter" href="utils.html" title="Utilities">
<link rel="chapter" href="extending.html" title="Extending GIO">
<link rel="part" href="migrating.html" title="Part&#160;III.&#160;Migrating to GIO">
<link rel="chapter" href="ch14.html" title="Migrating from POSIX to GIO">
<link rel="chapter" href="ch15.html" title="Migrating from GnomeVFS to GIO">
<link rel="chapter" href="gio-hierarchy.html" title="Object Hierarchy">
<link rel="index" href="ix01.html" title="Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GLoadableIcon.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="icons.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO Reference Manual</th>
<td><a accesskey="n" href="utils.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2795429" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2896770" class="shortcut">Description</a>
                  &#160;|&#160;
                  <a href="#id2877573" class="shortcut">Object Hierarchy</a>
                  &#160;|&#160;
                  <a href="#id2877597" class="shortcut">Implemented Interfaces</a>
                  &#160;|&#160;
                  <a href="#id2877618" class="shortcut">Properties</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="GThemedIcon"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2795429"></a><span class="refentrytitle">GThemedIcon</span>
</h2>
<p>GThemedIcon &#8212; Icon theming support</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;gio/gio.h&gt;


                    <a class="link" href="GThemedIcon.html#GThemedIcon-struct">GThemedIcon</a>;
<a class="link" href="GIcon.html" title="GIcon">GIcon</a>*              <a class="link" href="GThemedIcon.html#g-themed-icon-new">g_themed_icon_new</a>                   (const char *iconname);
<a class="link" href="GIcon.html" title="GIcon">GIcon</a>*              <a class="link" href="GThemedIcon.html#g-themed-icon-new-from-names">g_themed_icon_new_from_names</a>        (char **iconnames,
                                                         int len);
<a class="link" href="GIcon.html" title="GIcon">GIcon</a>*              <a class="link" href="GThemedIcon.html#g-themed-icon-new-with-default-fallbacks">g_themed_icon_new_with_default_fallbacks</a>
                                                        (const char *iconname);
void                <a class="link" href="GThemedIcon.html#g-themed-icon-append-name">g_themed_icon_append_name</a>           (<a class="link" href="GThemedIcon.html" title="GThemedIcon">GThemedIcon</a> *icon,
                                                         const char *iconname);


</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2877573"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">

  <a
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----GThemedIcon
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2877597"></a><h2>Implemented Interfaces</h2>
<p>
GThemedIcon implements
 <a class="link" href="GIcon.html" title="GIcon">GIcon</a>.</p>
</div>
<div class="refsect1" lang="en">
<a name="id2877618"></a><h2>Properties</h2>
<pre class="synopsis">

  "<a class="link" href="GThemedIcon.html#GThemedIcon--name">name</a>"                     <a
href="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a>            : Write / Construct Only
  "<a class="link" href="GThemedIcon.html#GThemedIcon--names">names</a>"                    <a
href="/usr/share/gtk-doc/html/gobject/gobject-Boxed-Types.html#GStrv"
>GStrv</a>                 : Read / Write / Construct Only
  "<a class="link" href="GThemedIcon.html#GThemedIcon--use-default-fallbacks">use-default-fallbacks</a>"    <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Write / Construct Only
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2896770"></a><h2>Description</h2>
<p>
<a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a> is an implementation of <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> that supports icon themes.
<a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a> contains a list of all of the icons present in an icon
theme, so that icons can be looked up quickly. <a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a> does
not provide actual pixmaps for icons, just the icon names.
Ideally something like <a
href="/usr/share/gtk-doc/html/gtk/GtkIconTheme.html#gtk-icon-theme-choose-icon"
><code class="function">gtk_icon_theme_choose_icon()</code></a> should be used to
resolve the list of names so that fallback icons work nicely with
themes that inherit other themes.</p>
<p>

</p>
</div>
<div class="refsect1" lang="en">
<a name="id2896830"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2896841"></a><h3>
<a name="GThemedIcon-struct"></a>GThemedIcon</h3>
<a class="indexterm" name="id2896854"></a><pre class="programlisting">typedef struct _GThemedIcon GThemedIcon;</pre>
<p>
An implementation of <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> for themed icons.</p>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2896879"></a><h3>
<a name="g-themed-icon-new"></a>g_themed_icon_new ()</h3>
<a class="indexterm" name="id2896892"></a><pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon">GIcon</a>*              g_themed_icon_new                   (const char *iconname);</pre>
<p>
Creates a new themed icon for <em class="parameter"><code>iconname</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iconname</code></em>&#160;:</span></p></td>
<td> a string containing an icon name.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a new <a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2896964"></a><h3>
<a name="g-themed-icon-new-from-names"></a>g_themed_icon_new_from_names ()</h3>
<a class="indexterm" name="id2896976"></a><pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon">GIcon</a>*              g_themed_icon_new_from_names        (char **iconnames,
                                                         int len);</pre>
<p>
Creates a new themed icon for <em class="parameter"><code>iconnames</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iconnames</code></em>&#160;:</span></p></td>
<td> an array of strings containing icon names.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em>&#160;:</span></p></td>
<td> the length of the <em class="parameter"><code>iconnames</code></em> array, or -1 if <em class="parameter"><code>iconnames</code></em> is 
    <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>-terminated
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a new <a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2897092"></a><h3>
<a name="g-themed-icon-new-with-default-fallbacks"></a>g_themed_icon_new_with_default_fallbacks ()</h3>
<a class="indexterm" name="id2897103"></a><pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon">GIcon</a>*              g_themed_icon_new_with_default_fallbacks
                                                        (const char *iconname);</pre>
<p>
Creates a new themed icon for <em class="parameter"><code>iconname</code></em>, and all the names
that can be created by shortening <em class="parameter"><code>iconname</code></em> at '-' characters.
</p>
<p>
In the following example, <em class="parameter"><code>icon1</code></em> and <em class="parameter"><code>icon2</code></em> are equivalent:
</p>
<div class="informalexample"><pre class="programlisting">
const char *names[] = { 
  "gnome-dev-cdrom-audio",
  "gnome-dev-cdrom",
  "gnome-dev",
  "gnome"
};

icon1 = g_themed_icon_new_from_names (names, 4);
icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
</pre></div>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iconname</code></em>&#160;:</span></p></td>
<td> a string containing an icon name
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a new <a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2885442"></a><h3>
<a name="g-themed-icon-append-name"></a>g_themed_icon_append_name ()</h3>
<a class="indexterm" name="id2885453"></a><pre class="programlisting">void                g_themed_icon_append_name           (<a class="link" href="GThemedIcon.html" title="GThemedIcon">GThemedIcon</a> *icon,
                                                         const char *iconname);</pre>
<p>
Append a name to the list of icons from within <em class="parameter"><code>icon</code></em>.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
Note that doing so invalidates the hash computed by prior calls
to <a class="link" href="GIcon.html#g-icon-hash"><code class="function">g_icon_hash()</code></a>.
</p>
</div>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>icon</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iconname</code></em>&#160;:</span></p></td>
<td> name of icon to append to list of icons from within <em class="parameter"><code>icon</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2885564"></a><h2>Property Details</h2>
<div class="refsect2" lang="en">
<a name="id2885574"></a><h3>
<a name="GThemedIcon--name"></a>The <code class="literal">"name"</code> property</h3>
<a class="indexterm" name="id2885589"></a><pre class="programlisting">  "name"                     <a
href="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a>            : Write / Construct Only</pre>
<p>
The icon name.</p>
<p>

</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2885618"></a><h3>
<a name="GThemedIcon--names"></a>The <code class="literal">"names"</code> property</h3>
<a class="indexterm" name="id2885633"></a><pre class="programlisting">  "names"                    <a
href="/usr/share/gtk-doc/html/gobject/gobject-Boxed-Types.html#GStrv"
>GStrv</a>                 : Read / Write / Construct Only</pre>
<p>
A <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>-terminated array of icon names.</p>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2885667"></a><h3>
<a name="GThemedIcon--use-default-fallbacks"></a>The <code class="literal">"use-default-fallbacks"</code> property</h3>
<a class="indexterm" name="id2885681"></a><pre class="programlisting">  "use-default-fallbacks"    <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Write / Construct Only</pre>
<p>
Whether to use the default fallbacks found by shortening the icon name 
at '-' characters. If the "names" array has more than one element, 
ignores any past the first.
</p>
<p>
For example, if the icon name was "gnome-dev-cdrom-audio", the array 
would become
</p>
<div class="informalexample"><pre class="programlisting">
{
  "gnome-dev-cdrom-audio",
  "gnome-dev-cdrom",
  "gnome-dev",
  "gnome",
  NULL
};
</pre></div>
<p>

</p>
<p>Default value: FALSE</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2885725"></a><h2>See Also</h2>
<a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a>, <a class="link" href="GLoadableIcon.html" title="GLoadableIcon"><span class="type">GLoadableIcon</span></a>
</div>
<div class="refsect1" lang="en">
<a name="id2885747"></a><div class="refsect2" lang="en"><a name="id2885748"></a></div>
<hr>
<div class="refsect2" lang="en"><a name="id2885749"></a></div>
</div>
</div>
</body>
</html>
